<template>
  <div class="exclusive">
    <div class="title" title="更多独家放送">
      <i
        class="iconfont icon-circleyuanquan"
        :style="{ color: themeColor }"
      ></i>
      <h3 style="margin-left: 0.625rem">独家放送</h3>
      <i class="el-icon-arrow-right"></i>
    </div>
    <div class="exclusive-box">
      <div class="exclusive-item" v-for="item in exclusives" :key="item.id">
        <div class="exclusive-img">
          <el-image :src="item.picUrl"></el-image>
        </div>
        <div class="play">
          <i class="iconfont icon-luxiang" :style="{ color: themeColor }"></i>
        </div>
        <span class="exclusive-text" :title="item.name">{{ item.name }}</span>
      </div>
    </div>
  </div>
</template>

<script>
import { getExclusive } from "@/api/index.js";
export default {
  name: "Exclusive",
  components: {},
  props: {
    themeColor: {
      type: String
    }
  },
  data() {
    return {
      exclusives: ""
    };
  },
  computed: {},
  watch: {},
  created() {
    this.getExclusive();
  },
  mounted() {},
  methods: {
    async getExclusive() {
      const data = await getExclusive();
      this.exclusives = data.data.result;
    }
  }
};
</script>

<style lang="scss" scoped>
.exclusive {
  .title {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    height: 3.125rem;
    margin: 0;
    font-size: 1.125rem;
    cursor: pointer;
    .el-icon-arrow-right {
      cursor: pointer;
    }
  }
  .exclusive-box {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.875rem;
    cursor: pointer;

    .exclusive-item {
      position: relative;
      width: 33.33%;
      box-sizing: border-box;
      padding: 0.3125rem 0.625rem;

      .el-image {
        width: 100%;
        height: 100%;
        border-radius: 0.3125rem;
      }

      .exclusive-text {
        font-size: 1rem;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 1;
        overflow: hidden;
      }

      .play {
        width: 1.875rem;
        height: 1.875rem;
        border-radius: 50%;
        position: absolute;
        background: rgba(0, 0, 0, 0.2);
        top: 0.625rem;
        left: 0.9375rem;
        z-index: 1;
        text-align: center;
        line-height: 3.125rem;
        font-size: 1.875rem;

        .icon-luxiang {
          position: absolute;
          top: 50%;
          left: 50%;
          transform: translate(-50%, -50%);
          font-size: 1rem;
          color: #fff;
        }
      }
    }
  }
}
</style>
